/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-left, .nav-right {
  display: flex;
  gap: 15px;
}

.nav-center input {
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  width: 200px;
}

.navbar a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* 已删除背景图样式（原.full-bg部分） */

/* 主体容器 */
.container {
  max-width: 1200px;
  margin: 80px auto 20px; /* 上边距调整为补偿导航栏 */
  padding: 0 15px;
}

/* 主体布局 */
main {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

/* 轮播图容器 */
.sidebar {
  flex: 1;
  min-width: 0;
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
}

.carousel-item img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* 内容区 */
.content {
  flex: 1;
}

/* 热门番剧 - 两行两列 */
.content .video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.content .video-grid .image-link {
  flex: 1 1 calc(50% - 7.5px);
  max-width: calc(50% - 7.5px);
}

/* 热门动漫 - 两行五列 */
.more-videos .video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.more-videos .video-grid .image-link {
  flex: 1 1 calc(20% - 12px);
  max-width: calc(20% - 12px);
}

/* 通用图片样式 */
.image-link {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-link:hover {
  transform: translateY(-5px);
}

.image-link img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.image-caption {
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .more-videos .video-grid .image-link {
    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
  }
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
  }
  
  .carousel-item img {
    height: 900px;
  }
  
  .more-videos .video-grid .image-link {
    flex: 1 1 calc(33.33% - 10px);
    max-width: calc(33.33% - 10px);
  }
}

@media (max-width: 480px) {
  .content .video-grid .image-link,
  .more-videos .video-grid .image-link {
    flex: 1 1 calc(50% - 7.5px);
    max-width: calc(50% - 7.5px);
  }
  
  .carousel-item img {
    height: 500px;
  }
  
  .navbar {
    flex-wrap: wrap;
  }
  
  .nav-left, .nav-right {
    width: 50%;
  }
  
  .nav-center {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }
  
  .nav-center input {
    width: 100%;
  }
}

/* 页脚 */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 1px solid #ddd;
  background-color: #333;
  color: white;
}